package com.example.HeadFirstDemo.Factory;

public class SimpleFactory {
    private static Car car;
    public static Car createCar(String type){
        if(type=="Benz"){
            car=new Benz();
        }else if(type=="Audi"){
            car=new Audi();
        }
        return car;
    }
}
